//
//  SelfSizeTool.m
//  10--UITableViewCell自适应高度
//
//  Created by 冀永金 on 16/7/27.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import "SelfSizeTool.h"

@implementation SelfSizeTool
+(CGFloat)selfSizeHeightWithString:(NSString *)string width:(CGFloat)width font:(UIFont *)font {
    CGRect newRect = [string boundingRectWithSize:CGSizeMake(width, 0) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:font} context:nil];
    return newRect.size.height;
}
@end
